interface State {
  count?: number;
}

// function 返回类型
export function test(): State {
  return {};
}

// 箭头函数返回写法
export  const test2 = (): State => ({});

// 在对象中作为属性
export  const store = {
  state: (): State => {
    return {};
  },
  test(): State {
    return {};
  },
};
